package tmt.usercenter.web.repository;


import com.tmt.jpa.jpaservice.ITmtBaseRepo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import tmt.usercenter.web.domain.ClientSystem;

public interface IClientSystemRepo extends ITmtBaseRepo<ClientSystem, Long> {

    ClientSystem findByName(String name);

    @Query("select t from ClientSystem t where t.clientId = :clientId")
    ClientSystem findByClientId(@Param("clientId") String clientId);

    @Query("select t.id from ClientSystem t where t.clientId = :clientId")
    Long findIdByClientId(@Param("clientId") String clientId);

    boolean existsByClientId(String clientId);

    boolean existsByName(String name);
}
